<?php
/**
*Class PSS - P.W.S.M.
*Main P.W.S.M functions 
*Author Roman Shneer romanshneer@gmail.com
*1.02.2012
*Any changes at your risk and criminal responsibility
*/
eval(base64_decode('Q2xhc3MgUFNTDQp7DQp2YXIgJGRiLCRyZXN1bHRzX2NvdW50LCRvYmplY3RfbmFtZTsNCnZhciAkcmVzdWx0c19zdGVwPTEwMDsNCnZhciAkbWVtY2FjaGVfb2JqOw0KdmFyICRsdT1mYWxzZTsNCiBmdW5jdGlvbiBQU1MoKQ0KIHsNCiBnbG9iYWwgJHN0YXJ0Ow0KIC8vZXh0ZW5kaW5nIGRiIGNsYXNzDQogJHRoaXMtPmRiPSRzdGFydC0+ZGI7DQogJHRoaXMtPmx1PSRzdGFydC0+dHJ1c3Q7DQogICAjJHRoaXMtPmNoa19kYigpOw0KIH0NCiAjIyMgbWVudSAjIyMNCiBmdW5jdGlvbiBkcmF3X21lbnUoKQ0KIHsNCg0KIAlyZXR1cm4gJHRoaXMtPmNoZWNrX2llKCkuJw0KIAk8dGFibGUgYm9yZGVyPTAgIGNsYXNzPSJtZW51Ij4NCiAJPHRyPg0KICAJPHRkPjxhIGhyZWY9Ij9xPWFnZW50c19saXN0Ij5PYmplY3RzIGxpc3Q8L2E+PC90ZD4NCiAgCTx0ZD48YSBocmVmPSI/cT1jb25maWciPkNvbmZpZyBzZWN1cml0eSBmaWx0ZXJzPC9hPjwvdGQ+DQogIAk8dGQ+PGEgaHJlZj0iP3E9dGVzdF9mb3JtIj5UZXN0IGZvcm08L2E+PC90ZD4NCiAgCTx0ZD48YSBocmVmPSI/cT11c2VycyI+VXNlcnM8L2E+PC90ZD48dGQ+PGEgaHJlZj0iP3E9YWJvdXQiPkFib3V0PC9hPjwvdGQ+JyAuDQogIAknPHRkPjxhIGhyZWY9Ij9xPWV4aXQiPkV4aXQ8L2E+PC90ZD4NCiAJPC90cj4NCiAJPC90YWJsZT4NCiAJJzsNCiB9DQpmdW5jdGlvbiBhYm91dF9wYWdlKCkNCnsN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YXkNCiAgICAgICAgICAgICAgICAgICAgJHJlcGVhdGVkX3RhZ19pbmRleFskdGFnLidfJy4kbGV2ZWxdID0gMjsNCg0KICAgICAgICAgICAgICAgICAgICBpZihpc3NldCgkY3VycmVudFskdGFnLidfYXR0ciddKSkgeyAvL1RoZSBhdHRyaWJ1dGUgb2YgdGhlIGxhc3QoMHRoKSB0YWcgbXVzdCBiZSBtb3ZlZCBhcyB3ZWxsDQogICAgICAgICAgICAgICAgICAgICAgICAkY3VycmVudFskdGFnXVsnMF9hdHRyJ10gPSAkY3VycmVudFskdGFnLidfYXR0ciddOw0KICAgICAgICAgICAgICAgICAgICAgICAgdW5zZXQoJGN1cnJlbnRbJHRhZy4nX2F0dHInXSk7DQogICAgICAgICAgICAgICAgICAgIH0NCg0KICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICAkbGFzdF9pdGVtX2luZGV4ID0gJHJlcGVhdGVkX3RhZ19pbmRleFskdGFnLidfJy4kbGV2ZWxdLTE7DQogICAgICAgICAgICAgICAgJGN1cnJlbnQgPSAmJGN1cnJlbnRbJHRhZ11bJGxhc3RfaXRlbV9pbmRleF07DQogICAgICAgICAgICB9DQoNCiAgICAgICAgfSBlbHNlaWYoJHR5cGUgPT0gImNvbXBsZXRlIikgeyAvL1RhZ3MgdGhhdCBlbmRzIGluIDEgbGluZSAnPHRhZyAvPicNCiAgICAgICAgICAgIC8vU2VlIGlmIHRoZSBrZXkgaXMgYWxyZWFkeSB0YWtlbi4NCiAgICAgICAgICAgIGlmKCFpc3NldCgkY3VycmVudFskdGFnXSkpIHsgLy9OZXcgS2V5DQogICAgICAgICAgICAgICAgJGN1cnJlbnRbJHRhZ10gPSAkcmVzdWx0Ow0KICAgICAgICAgICAgICAgICRyZXBlYXRlZF90YWdfaW5kZXhbJHRhZy4nXycuJGxldmVsXSA9IDE7DQogICAgICAgICAgICAgICAgaWYoJHByaW9yaXR5ID09ICd0YWcnIGFuZCAkYXR0cmlidXRlc19kYXRhKSA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mV3IHZhbHVlDQogICAgICAgICAgICAgICAgICAgICRyZXBlYXRlZF90YWdfaW5kZXhbJHRhZy4nXycuJGxldmVsXSA9IDE7DQogICAgICAgICAgICAgICAgICAgIGlmKCRwcmlvcml0eSA9PSAndGFnJyBhbmQgJGdldF9hdHRyaWJ1dGVzKSB7DQogICAgICAgICAgICAgICAgICAgICAgICBpZihpc3NldCgkY3VycmVudFskdGFnLidfYXR0ciddKSkgeyAvL1RoZSBhdHRyaWJ1dGUgb2YgdGhlIGxhc3QoMHRoKSB0YWcgbXVzdCBiZSBtb3ZlZCBhcyB3ZWxsDQoNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAkY3VycmVudFskdGFnXVsnMF9hdHRyJ10gPSAkY3VycmVudFskdGFnLidfYXR0ciddOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2V0KCRjdXJyZW50WyR0YWcuJ19hdHRyJ10pOw0KICAgICAgICAgICAgICAgICAgICAgICAgfQ0KDQogICAgICAgICAgICAgICAgICAgICAgICBpZigkYXR0cmlidXRlc19kYXRhKSB7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgJGN1cnJlbnRbJHRhZ11bJHJlcGVhdGVkX3RhZ19pbmRleFskdGFnLidfJy4kbGV2ZWxdIC4gJ19hdHRyJ10gPSAkYXR0cmlidXRlc19kYXRhOw0KICAgICAgICAgICAgICAgICAgICAgICAgfQ0KICAgICAgICAgICAgICAgICAgICB9DQogICAgICAgICAgICAgICAgICAgICRyZXBlYXRlZF90YWdfaW5kZXhbJHRhZy4nXycuJGxldmVsXSsrOyAvLzAgYW5kIDEgaW5kZXggaXMgYWxyZWFkeSB0YWtlbg0KICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgIH0NCg0KICAgICAgICB9IGVsc2VpZigkdHlwZSA9PSAnY2xvc2UnKSB7IC8vRW5kIG9mIHRhZyAnPC90YWc+Jw0KICAgICAgICAgICAgJGN1cnJlbnQgPSAmJHBhcmVudFskbGV2ZWwtM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